package com.zyz.bookborrowing.service;

import com.zyz.bookborrowing.bean.Department;
import com.zyz.bookborrowing.dao.DepartmentDaoImpl;
import com.zyz.bookborrowing.dao.IDepartmentDao;

import java.util.List;

public class DepartmentServiceImpl implements IDepartmentService{

    IDepartmentDao iDepartmentDao = new DepartmentDaoImpl();

    @Override
    public List<Department> list(Department dept) {
        return iDepartmentDao.list(dept);
    }

    @Override
    public Integer saveDepartment(Department dept) {
        return iDepartmentDao.saveDepartment(dept);
    }

    @Override
    public Integer updateDepartment(Department dept) {
        return iDepartmentDao.updateDepartment(dept);
    }

    @Override
    public Integer deleteById(Integer id) {
        return iDepartmentDao.deleteById(id);
    }

    @Override
    public Department queryById(Integer id) {
        return iDepartmentDao.queryById(id);
    }
}
